/**
 * 
 */
package org.mspring.platform.web.freemarker.directive;

import java.io.IOException;
import java.util.Map;

import freemarker.core.Environment;
import freemarker.template.TemplateDirectiveBody;
import freemarker.template.TemplateDirectiveModel;
import freemarker.template.TemplateException;
import freemarker.template.TemplateModel;

/**
 * 所有自定义标签的基类
 * 
 * @author Gao Youbo
 * @since 2012-7-26
 */
public abstract class AbstractDirectiveModel implements TemplateDirectiveModel {

    @SuppressWarnings({ "rawtypes" })
    @Override
    public final void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException {
        // TODO Auto-generated method stub
        exec(env, params, loopVars, body);
    }

    @SuppressWarnings({ "rawtypes" })
    public abstract void exec(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException;
}
